"""
@Filename       : geo_entity_extraction.py
@Create Time    : 2021/4/27 21:16
@Author         : Rylynn
@Description    : 

"""

import nltk
import tagme
# from nltk.tag import StanfordNERTagger


tagme.GCUBE_TOKEN = ''
theta = 0.5

with open('F:/data/location/na/user_info.dev/user_info.dev', 'r', encoding='utf8') as f:
    for line in f.readlines():
        username, x, y, tweets = line.strip().split('\t')
        annotations = tagme.annotate(tweets, lang='en')
        for ann in annotations.get_annotations(theta):
            print(ann)
